@extends('admin._layouts.default')

<script language="javascript" type="text/javascript" src="{{ URL::asset('ueditor/ueditor.config.js') }}"></script>
<script language="javascript" type="text/javascript" src="{{ URL::asset('ueditor/ueditor.config.js') }}"></script>
<script language="javascript" type="text/javascript" src="{{ URL::asset('ueditor/ueditor.all.min.js') }}"></script>
<script language="javascript" type="text/javascript" src="{{ URL::asset('ueditor/lang/zh-cn/zh-cn.js') }}"></script>
@section('main')

      <div class="row-fluid ">
        <div class="box gradient">
          <div class="title">
            <h3><a href="{{ route('admin.accounts.materials') }}"  class="btn btn-mini pull-right" style="margin:5px 5px 0 0"><i class="fa fa-hand-o-left"></i> 返回</a>
            <i class="fa fa-share-alt"></i><span>确认支付</span>
            </h3>
          </div>
          <div class="content">

            {{ Form::model($buyrecord, array('method' => 'put',  'route' => array('admin.buyrecords.update', $buyrecord->id),'class'=>'form-horizontal  row-fluid')) }}
                  <input type="hidden" name="id" value="{{ $buyrecord->id }}">
                  <div class="form-row control-group row-fluid">
                    <label class="control-label span3" for="text">用户姓名</label>
                    <div class="controls span2">
                      <div class="input-prepend row-fluid">
                        <input class="row-fluid" disabled value="{{ $buyrecord->customer->name }}" name="title" id="cloth2" required  size="50" type="text">

                      </div>
                    </div>
                  </div>
                  <div class="form-row control-group row-fluid">
                    <label class="control-label span3" for="text">城市</label>
                    <div class="controls span2">
                      <div class="input-prepend row-fluid">
                        <input class="row-fluid" disabled value="{{ $buyrecord->customer->cityname->name }}" name="title" id="cloth2" required  size="50" type="text">

                     </div>
                    </div>
                  </div>
                  <div class="form-row control-group row-fluid">
                    <label class="control-label span3" for="text">分销区域</label>
                    <div class="controls span2">
                      <div class="input-prepend row-fluid">
                        <input class="row-fluid" disabled value="{{ $buyrecord->customer->areaname->name }}" name="title" id="cloth2" required  size="50" type="text">
                    </div>
                    </div>
                  </div>
                  <div class="form-row control-group row-fluid">
                    <label class="control-label span3" for="text">使用代金券</label>
                    <div class="controls span2">
                      <div class="input-prepend row-fluid">
                        <input class="row-fluid" disabled value="{{ $buyrecord->Commodity->name  }}" name="title" id="cloth2" required  size="50" type="text">

                      </div>
                    </div>
                  </div>
                  <div class="form-row control-group row-fluid">
                    <label class="control-label span3" for="text">应付金额</label>
                    <div class="controls span2">
                      <div class="input-prepend row-fluid">
                        <input class="row-fluid" disabled value="{{ $buyrecord->Commodity->member_price }}" name="title" id="cloth2" required  size="50" type="text">

                      </div>
                    </div>
                  </div>

                  <div class="form-actions row-fluid">
                    <div class="span10 offset3">
                      <button type="submit" class="btn btn-large btn-info"><i class="fa fa-save"></i> 提交</button>
                    </div>
                  </div>
              {{ Form::close() }}


            </div>
        </div>
        <!-- End box -->
      </div>

@stop


@section('modals')

<div id="confirm_alert" class="modal fade bs-example-modal-sm" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true">
  <div class="modal-dialog modal-sm">
    <div class="modal-content">
      <div class="modal-header">
              <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
        <h3 class="modal-title" id="myModalLabel">确定本次操作吗？</h3>
      </div>
      <div class="modal-body">
        <i class=" icon-warning-sign color_red pull-left fs_24"></i>

        <p>一旦【确定】，本次操作不可撤销。</p>

      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
        <button type="button" class="btn btn-primary">确定</button>
      </div>
    </div>
  </div>
</div>
@stop


@section('script')
<script language="javascript" type="text/javascript" src="{{ URL::asset('ad/js/plugins/full-calendar/fullcalendar.min.js') }}"></script>
<script language="javascript" type="text/javascript" src="{{ URL::asset('ad/js/plugins/jquery.peity.min.js') }}"></script>
<script type="text/javascript" language="javascript" src="{{ URL::asset('ad/js/plugins/datatables/js/jquery.dataTables.js') }}"></script>
<script language="javascript" type="text/javascript" src="{{ URL::asset('ad/js/plugins/chosen/chosen/chosen.jquery.min.js') }}"></script>
<script language="javascript" type="text/javascript" src="{{ URL::asset('ad/js/plugins/flot/jquery.flot.js') }}"></script>
<script language="javascript" type="text/javascript" src="{{ URL::asset('ad/js/plugins/jquery.uniform.min.js') }}"></script>
<script src="{{ URL::asset('ad/js/plugins/justGage.1.0.1/resources/js/raphael.2.1.0.min.js') }}"></script>
<script src="{{ URL::asset('ad/js/plugins/justGage.1.0.1/resources/js/justgage.1.0.1.min.js') }}"></script>
<script src="{{ URL::asset('ad/js/scripts.js') }}"></script>


    <script type="text/javascript" charset="utf-8">
    // Datatables
    $(document).ready(function() {
      var dontSort = [];
                $('#datatable_city thead th').each( function () {
                    if ( $(this).hasClass( 'no_sort' )) {
                        dontSort.push( { "bSortable": false } );
                    } else {
                        dontSort.push( null );
                    }
      } );
      $('#datatable_city').dataTable( {
        "sDom": "<'row table_top_bar'<'row-fluid'>'<'to_hide_phone'>'f'<'>r>t<'row'>",
         "sDom": "<'row table_top_bar'<'row-fluid'<'to_hide_phone' f>>><'row'>",
         "aaSorting": [[ 1, "asc" ]],
        "bPaginate": false,
        "bJQueryUI": false,
        "aoColumns": dontSort

      } );
      $.extend( $.fn.dataTableExt.oStdClasses, {
        "s`": "dataTables_wrapper form-inline"
      } );
    } );
    </script>
    <script type="text/javascript">

        //实例化编辑器
        //建议使用工厂方法getEditor创建和引用编辑器实例，如果在某个闭包下引用该编辑器，直接调用UE.getEditor('editor')就能拿到相关的实例
        var ue = UE.getEditor('editor');

    </script>
@stop
